<?php
/**
 * 有验证码的定单列表
 * 
 */

define('IN_ECS', true);

require(dirname(__FILE__) . '/includes/init.php');
require_once(ROOT_PATH . 'includes/lib_order.php');
require_once(ROOT_PATH . 'includes/lib_goods.php');

$filter['order_sn'] = empty($_REQUEST['order_sn']) ? '' : trim($_REQUEST['order_sn']);

$where = 'WHERE 1 ';
if($filter['order_sn'])
{
	$where .= " AND order_sn = '" . $filter['order_sn'] . "'";
}

$sql = "SELECT * FROM " . $GLOBALS['ecs']->table('order_code') . " {$where} ORDER BY last_updated DESC";
$rows = $GLOBALS['db']->getAll($sql);

//print_r($rows);
$smarty->assign('order_list',   $rows);
$smarty->display('order_code.htm');